Proximity Detection

ABSTRACT

For proximity detection, capacitance of a sensing element to ground is measured as one or more objects move into or out of proximity to the sensing element.

BACKGROUND

A proximity sensor detects the presence of a nearby person or object ina region or area. A proximity sensor may employ an electromagnetic orelectrostatic field, or a beam of electromagnetic radiation, e.g.,infrared, or acoustic energy and detect changes in the field or returnsignal. Proximity sensing can utilize different sensor types fordifferent types of target objects. For example a photoelectric sensormight be suitable for a plastic target; an inductive proximity sensormight be used to detect a metal target.

Different types of proximity sensors have different maximum distanceswithin which the sensors can detect an object. Some sensors haveadjustments of the nominal distance range or means to report a graduateddetection distance. Proximity sensors can have a high reliability andlong functional life because of the absence of mechanical parts and lackof physical contact between sensor and the sensed object.

SUMMARY

The following disclosure describes examples of proximity detection andproximity sensors. Capacitance of a sensing element to ground ismeasured as an object moves into or out of proximity to the sensingelement.

BRIEF DESCRIPTION OF THE DRAWINGS

The drawing figures depict one or more implementations in accordancewith the present teachings, by way of example only, not by way oflimitation. In the figures, like reference numerals refer to the same orsimilar elements.

FIG. 1 is a circuit diagram of an example of a proximity sensorutilizing capacitive charge transfer;

FIG. 2 illustrates a switching table depicting a switching sequence ofthe three switches of the sensor circuit of FIG. 1;

FIG. 3 illustrates a variation to the circuit of FIG. 1;

FIG. 4 illustrates schematically various antenna examples;

FIG. 5 is a circuit diagram of another example of a proximity sensor,utilizing a LC oscillator;

FIG. 6 is a circuit diagram of another example of a proximity sensor,utilizing a generic oscillator; and

FIG. 7 illustrates schematically an example of an antenna configured asa loop antenna and shows field lines emanating from the antenna.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are setforth by way of examples in order to illustrate the relevant teachings.In order to avoid unnecessarily obscuring aspects of the presentteachings, those methods, procedures, components, and/or circuitry thatare well-known to one of ordinary skill in the art have been describedat a relatively high-level.

The examples shown and described implement a form of proximity detectionutilizing detection of capacitance of a sensing element, relative toground, as objects move into or out of proximity to the sensing element.For example, the proximity detection may occur over significantdistances from a proximity sensor, compared to the dimensions of thesensor, or when the proximity sensor is touched by a person or othertarget object.

Reference now is made in detail to the examples illustrated in theaccompanying figures and discussed below.

The circuit diagram of FIG. 1 illustrates schematically the circuit ofan example of a proximity sensor 100 that utilizes capacitive chargetransfer for proximity detection. Sensor 100 may include controlcircuitry 110, a sample capacitor 114, and a sensing element, e.g., anantenna 120. Sensor 100 senses changes in capacitance of the antenna 120to ground C_(x), as indicated by capacitance 122. Sample capacitor 114may be selected to be much larger than anticipated values of C_(x). Thecontrol circuitry 110 may include switching functionality to charge thesample capacitor 114 and the capacitance to be measured C_(x). Thecontrol circuitry 110 may also include switching functionality toselectively discharge the sample capacitor 114 and/or antenna 120 and toallow for measurement of the voltage V_(cs) across the sample capacitor114. An example of how the switching functionality of control circuitry110 may operate is described in further detail with regard to FIG. 2.

As a person or other object approaches or moves away from the antenna120, changes in the capacitance C_(x) of the antenna 120 will occur. Forexample, as a person approaches antenna 120, C_(x) will increase, and asthe person moves away from the antenna 120, C_(x) will decrease. Thechange in C_(x) produces a measurable effect, which can be utilized bythe sensor 100 for proximity detection.

In the circuit depicted in FIG. 1, a first switching element S1 can beused to discharge sample capacitor Cs and the capacitance to be measuredC_(x). The circuit can include a second switching element S2 and a thirdswitching element S3 as shown. Any suitable switching elements can beused for switching elements S1-S3. For example, suitable transistors orrelays can be used. The second switching element S2 can operate toselectively connect the circuit to a voltage source, e.g., V_(dd). Thevoltage source V_(dd) may supply a suitable voltage including, but notlimited to, any voltage within a range of about 1.8 to about 5.5 V. Whenthe second switching element S2 is closed, charge can be applied to thesample capacitor 114 and C_(x) of the antenna 130. The third switchingelement S3 can operate to selectively connect the circuit to ground. Ananalog comparator 112 can be included to compare voltage on the C_(s)capacitor to a reference voltage signal, indicated by VREF. Any suitablereference voltage may be used. The output of the comparator 112, e.g.,analog comparator output ACO, can be used to determine when the voltageon C_(s) has reached the reference voltage VREF. As C_(s) and C_(x) arein parallel, they form a capacitive voltage divider. The voltage onC_(s) is consequently influenced by C_(x). The lower the referencevoltage, the more energy can be maintained in the antenna 130.

For measuring capacitance on C_(s) as affected by C_(x), the output ofthe comparator 112 can be provided to a clock input of a pulse widthmodulator (PWM) circuit 140. The PWM circuit 140 can be used to gate acounter 150 that is clocked at a suitable frequency to count the numberof pulses during a specified time. The control circuitry 110 may alsoinclude a processor 160 and storage functionality 170, e.g., suitableROM and/or RAM, for holding software instructions and buffered data. Theprocessor 160 can receive the counter output and correlate the counteroutput to C_(s), C_(x), and the proximity of a person or object to thesensor 100. The output of the counter 150 as received by the processor160 may be suitably filtered for reducing noise effects. The processor160 can process the output of the counter 150 for detecting proximity ofan object relative to the antenna 120. The control circuitry 110 canprovide an output signal, e.g., as shown by the DETECT signal of FIG. 1,that is indicative of the presence or absence of a person or objectwithin proximity of the sensor 100. The output signal of the controlcircuitry 110 may be a bit, a byte, or an analog signal if a D/Aconverter (not shown) is utilized. The output signal of the controlcircuitry 110 may indicate the presence or absence of one or moreobjects within proximity to the sensor 100 or may indicate a degree ofproximity to the sensor. The control circuitry output signal may be usedto indicate the presence or absence of an object within a detectionrange of the sensor 100. For example, the output signal may be used toproduce an audible signal such as a particular tone or an optical signalsuch as a particular color when an object is detected. The sound orcolor may be changed to indicate a change in the proximity of an objectto the sensor 100.

For some applications, a dynamic reference voltage may be used to alterthe sensing functionality of sensor 100. Raising the reference voltagemay lower the nominal range of the sensor, for example from one foot (30cm) maximum sensing distance from the antenna down to a few millimetersmaximum sensing distance for proximity detection of a touch. Forexample, a sensor such as sensor 100 may be placed in a child's toybear. If a child were to approach within a specified distance, e.g., sixinches or so, the bear could respond with a verbal response such as“pick me up,” encouraging the child to hold the toy. The proximitydetection of the sensor may then be changed, by simply altering thereference voltage of the sensor, to close proximity-based touch sensing,allowing the bear to subsequently respond to the child's actual touches.Dynamically changing the nominal detection range of a proximity sensorin such a way may add commercial value to the related good(s) orcomponents.

The control circuitry 110 can be implemented, for example, by a suitablemicrocontroller, a field programmable gate array (FPGA), or otherstandard logic devices. For example, an ATtiny48 microcontroller, asmade commercially available by ATMEL Corporation, and/or a suitabletimer/counter may be used for implementation of the control circuitry110. In an example, the sample capacitor 114 may have a nominalcapacitance of 4.7 nF and be 10 percent X7R ceramic.

FIG. 2 illustrates a switching table 200 depicting a switching sequenceof the three switches of FIG. 1 during a charge transfer cycle foroperation of the sensor 100. Referring to the table, at step 1,switching elements S1 and S3 are closed while switching element S2 isopen, grounding both capacitors and thereby allowing C_(s) and C_(x) todischarge. Next, at step 2, all switching elements are open, whichallows the voltage on C_(s) and C_(x) to float. Following at step 3,switching elements S1 and S3 are open while switching element S2 isclosed, applying voltage V_(dd) to both capacitors and thereby allowingcharge to transfer to C_(s) and C_(x). At step 4, all three switchingelements S1-S3 are open, which allows voltage on C_(s) and C_(x) tofloat and settle. Following, at step 5, switching element 1 is closedwhile switching elements S2-S3 are open, allowing the charge in C_(x) todischarge and for a comparison of the voltage on C_(s) with thereference voltage, e.g., VREF in FIG. 1. The switching sequence of steps2 to 5 may be repeated for later measurements of the capacitance. Adesired number of repeated measurements using steps 2 to 5 can beperformed. Changes in capacitance C_(x) can be interpreted to detectmovement of an object toward or away from the antenna 120.

FIG. 3 illustrates schematically a variation to the circuit of FIG. 1with a reference voltage set by a voltage divider 130 includingresistors 132 and 134 in series. Any desired values may be selected forresistors 132 and 134 so as to produce a desired reference voltage. ThePWM, counter, processor, and storage are omitted to simplify thedrawing.

FIG. 4 illustrates schematically a collection 400 of antenna examplesthat may be used in a proximity sensor. Depicted in the drawing are asquare loop antenna (A), a curved loop antenna (B), a line antenna (C),a dipole antenna (D), and a patch antenna (E). The configurations shownare representative, and other antenna configurations may be used forproximity detection.

For some proximity sensor applications, antennas may be configured forproximity detection in one general direction. In other applications,antennas may be configured for proximity detection in multipledirections. For antennas suitable for exemplary proximity sensors, planecharges such as produced by rectangular plates, e.g., as shown by thepatch antenna (E), may offer good distance characteristics because thegreatest field strength is expressed perpendicular to the surface of theplane. Such configurations, however, may allow limited space for relatedcomponents of a proximity sensor or a device incorporating such asensor, e.g., control circuitry, key pads, etc.

For some applications, electric field lines from a sensor antenna can beoriented to form a directional antenna and still offer available spacewithin or adjacent to the antenna, e.g., within the perimeter of theantenna. In some applications, a square loop or dipole antenna may beused. Examples are shown in FIGS. 4 as (A), (B), and (D). For example, aproximity sensor using a rectangular loop or dipole antenna placed inthe perimeter of a wall mounted device, e.g., a wall mounted thermostator security keypad, may offer good proximity detection for approachesfrom all four sides. A sensor with such an antenna may also offer gooddetection distance when approached head on. Such head on proximitydetection may be at distances greater than or equal to the dimensions ofa particular antenna. For example, a 6-inch diameter curved loop antennamay provide reliable proximity detection at 12 inches from the plane ofthe antenna. Such a sensor using the curved loop antenna could also, oralternatively, be set so that one would have to actually touch thesensor housing/casing before being detected by the sensor.

Sensors or antennas configured as points, spheres and lines, because oftheir radial field spreading with distance, may be well suited forproximity detection in applications where the direction of approach isunknown or variable. As described previously, some applications may,however, require proximity detection from one general direction.

The exemplary proximity sensors can utilize other types of measurementof an antenna's capacitance to ground for proximity detection. FIG. 5shows one such example in which the variable C_(x) of an antenna isutilized to alter the resonant frequency of an LC circuit.

The circuit diagram of FIG. 5 illustrates schematically a proximitysensor 500 utilizing a LC oscillator. Proximity sensor 500 includescontrol circuitry 510, a tank circuit or LC oscillator 520, and asensing element, e.g., antenna 530. The control circuitry 510 caninclude a suitable processor 540 and storage 550. The LC oscillator 520includes inductor 522 and sample capacitor 524. The control circuitry510 can include frequency counter and excitation functionality and cansupply an excitation signal to the LC oscillator 520. The controlcircuitry 510 can also supply a charge to the antenna 530, which has acapacitance to free space or ground, C_(x). The capacitance C_(x) can beinfluenced by people or objects coming into and moving out of proximityto the sensor antenna 530. A microcontroller such as an Atmel® ATtiny48microcontroller and/or a suitable timer/counter may be used forimplementation of the control circuitry 510.

For sensor 500, as an object or person approaches or comes intoproximity with the sensing element 530, the capacitance C_(x) increases.As an object or person moves away and out of proximity to the sensingelement 530, the capacitance C_(x) decreases. Because C_(x) is inparallel with C_(s), the new C_(x) changes the capacitance of theoscillator 520, changing the resonant frequency, f, where f is given by:

$f = \frac{1}{2\pi \sqrt{LC}}$

The control circuitry 510 can measure the change in the resonantfrequency f, which can be correlated to capacitance C_(x) andcorresponding proximity of an object or person within range of thesensor 500.

In addition to proximity sensors utilizing oscillators according to FIG.5, other types of resonant circuits and structures may be used inconjunction with a variable capacitance of a sensing element.

The circuit diagram of FIG. 6 illustrates schematically another exampleof a proximity sensor 600 utilizing a generic oscillator. Proximitysensor 600 includes control circuitry 610 and a generic oscillator 620connected to a sensing element configured as an antenna 630. The controlcircuitry 610 can include a suitable processor 640 and storage 650. Thecontrol circuitry 610 can include frequency counter and excitationfunctionality. In exemplary embodiments, a microcontroller such as anAtmel® ATtiny48 microcontroller and/or a suitable timer/counter may beused for implementation of the control circuitry 610.

As indicated in FIG. 6, any electric oscillator affected by a change incapacitance C_(x) may be used for proximity detection by sensor 600.Examples may include, but are not limited to, RC network oscillatorssuch as a Wien bridge oscillator, a twin T oscillator, and the like, orRLC networks. Changes in C_(x) will change the resonant frequency of theoscillator 620. By recognizing the change in C_(x), sensor 600 canprovide for proximity detection. The detection range of the sensor 600may be dynamically varied by adjusting the values of R and/or C in theoscillator 620, e.g., by switching in or out resistive or capacitiveelements.

FIG. 7 illustrates schematically an antenna 700 configured as a loopantenna and shows field lines emanating from the antenna. Antenna 700 isconfigured as a rectangular loop, shown with perimeter 702. Because ofthe field features, rectangular loop antennas can provide both lateralproximity detection and proximity detection in orthogonal directions. InFIG. 7, electric field lines for lateral proximity detection areindicated by field lines 1, and electric field lines for orthogonal orhead on directions are indicated by field lines 2.

With continued reference to FIG. 7, the open area A within the perimeterof the antenna 700 may be utilized for components that are to be used inconjunction with the proximity sensor. For example, the area within thedashed lines within perimeter 702 may be used for a keypad or cardreader or other components of a device that incorporates a proximitysensor that includes the antenna 700.

Some implementations of proximity detection may involve programming. Forexample, a microcontroller may include firmware facilitating the controlof the switching functionality for charging and discharging a samplecapacitor and antenna of a proximity sensor as shown in the table ofFIG. 2 and the measuring of capacitance to detect proximity. An articleof manufacture may include the program, e.g., executable code and/orassociated data, carried on or embodied in a machine readable medium. Amachine readable medium may take many forms, including but not limitedto, a tangible non-transitory storage medium, a carrier wave medium, orphysical transmission medium. Non-volatile types of non-transitory,tangible storage media include any or all of the memory of thesupporting electronics of a proximity sensor, computing devices,processors or the like, or associated modules thereof, such as varioussemiconductor memories, tape drives, disk drives and the like, which mayprovide storage at any time for the programming. All or portions of theprogramming may at times be communicated through the Internet or variousother telecommunication networks. Such communications, for example, mayenable loading of the programming from one computer or processor intoanother computer or processor, e.g., for installation in amicrocontroller. Thus, another type of media that may bear theprogramming includes optical, electrical and electromagnetic waves, suchas used across physical interfaces between local devices, through wiredand optical landline networks and over various air-links. The physicalelements that carry such waves, such as wired or wireless links, opticallinks or the like, also may be considered as media bearing the software.

Various modifications may be made to the examples and embodimentsdescribed in the foregoing description, and any related teachings may beapplied in numerous applications, only some of which have been describedherein. It is intended by the following claims to claim any and allapplications, modifications and variations that fall within the truescope of the present teachings.

1. A proximity sensor comprising: an antenna, wherein the antenna has acapacitance to ground that is variable as a function of the proximity ofan object to the antenna; a sample capacitor connected to the antenna;and control circuitry connected to the sample capacitor, the controlcircuitry configured to: supply a charge to the sample capacitor and theantenna; discharge the antenna; in response to the discharge of theantenna, provide a signal indicative of the capacitance to ground of theantenna; and process the signal to detect a change in the capacitance toground as indicative of the proximity of the object to the antenna. 2.The proximity sensor of claim 1, wherein: the control circuitrycomprises three switching elements and an analog comparator, eachswitching element has a respective open state and a respective closedstate, a first of the switching elements is configured to connect thesample capacitor to ground it the closed state, a second of theswitching elements is configured in the closed state to connect avoltage source to the sample capacitor at a polarity opposite a polarityof the connection of the first switch element to the sample capacitorand to the comparator, a third of the switching elements configured inthe closed state to connect the comparator and sample capacitor toground, and the comparator is configured to receive a reference voltageand to compare the reference voltage to the voltage on the samplecapacitor.
 3. The proximity sensor of claim 2, wherein the controlcircuitry is configured to discharge the antenna and the samplecapacitor when the first and third switching elements are in the closedstate and the second switching element is in the open state.
 4. Theproximity sensor of claim 2, wherein the control circuitry is configuredto cause the voltage on the sample capacitor to float when the first,second, and third switching elements are in the open state.
 5. Theproximity sensor of claim 2, wherein the control circuitry is configuredto transfer charge to the sample capacitor and the antenna when thefirst and third switching elements are in the open state and the secondswitching element is in the closed state.
 6. The proximity sensor ofclaim 2, wherein the control circuitry is configured to discharge theantenna and the sample capacitor and compare the voltage across thesample capacitor and the reference voltage when the first switchingelement is in the closed state and the second and third switchingelements are in the open state.
 7. The proximity sensor of claim 2,wherein the control circuitry further comprises a pulse width modulationcircuit configured to receive on a clock input an output of thecomparator.
 8. The proximity sensor of claim 7, further comprising acounter configured to produce an output signal gated by an output of thepulse width modulation circuit.
 9. The proximity sensor of claim 1,wherein the antenna comprises a loop antenna.
 10. The proximity sensorof claim 1, wherein the control circuitry is configured to dynamicallyvary the detection range of the proximity sensor.
 11. A proximity sensorcontroller, comprising: control circuitry including a processor, whereinthe control circuitry is connected to a sample capacitor and an antenna,wherein the antenna has a capacitance to ground that is variable as afunction of proximity of an object to the antenna, the processorconfigured to execute instructions that cause the processor to performfunctions to measure the antenna capacitance to ground, comprisingfunctions to: supply a charge to the sample capacitor and the antenna;discharge the antenna; in response to the discharge of the antenna,provide a signal indicative of the capacitance to ground of the antenna;and process the signal to detect a change in the capacitance to groundas indicative of the proximity of the object to the antenna.
 12. Theproximity sensor controller of claim 11, wherein the control circuitrycomprises three switching elements and an analog comparator, whereineach switching element has a respective open state and a respectiveclosed state, wherein a first switching element is configured to connectthe sample capacitor to ground it the closed state, wherein a secondswitching element is configured in the closed state to connect a voltagesource to the sample capacitor at a polarity opposite a polarity of theconnection of the first switch element to the sample capacitor and tothe comparator, and a third switching element configured in the closedstate to connect the comparator and sample capacitor to ground, andwherein the comparator is configured to receive a reference voltage andto compare the reference voltage to the voltage on the sample capacitor.13. The proximity sensor controller of claim 11, wherein the processoris further configured to perform functions to: dynamically vary thedetection range of the proximity sensor. 14.-15. (canceled)
 16. Aproximity sensor comprising: an antenna, wherein the antenna has acapacitance to ground that is variable as a function of the proximity ofan object to the antenna; an oscillator connected to the antenna,wherein the oscillator includes a capacitor; and control circuitryconnected to the oscillator, the control circuitry configured to: supplyan excitation to the oscillator and a charge to the antenna; measure theresonant frequency of the oscillator; and provide a signal indicative ofthe proximity of the object to the antenna.
 17. The proximity sensor ofclaim 16, wherein the oscillator comprises a LC tank circuit.
 18. Theproximity sensor of claim 16, wherein the oscillator comprises a RCnetwork.
 19. The proximity sensor of claim 16, wherein the antennacomprises a loop antenna.
 20. The proximity sensor of claim 16, whereinthe control circuitry is further configured to dynamically vary thedetection range of the proximity sensor.